﻿var re=/^[1-9][0-9]{4,100}$/;
function conceal()
{
 $('StIM5').style.display="none";
  if($get("tIM5").value.search(re)&&$get("tIM5").value!="")
  {
    $('StIM5').style.display="";
    showProgressBar(false);
    return;
  }
}
//保存我的联系方式
function SaveCont()
{
    $get("MessagesBox").style.display='none';
    $get("btnSave").disabled = true;
    showProgressBar(true);
    var tIM1=$get("tIM1").value;
    var tIM2=$get("tIM2").value;
    var tIM3=$get("tIM3").value;
    var tIM4=$get("tIM4").value;
    var tIM5=$get("tIM5").value;
    var tIM6=$get("tIM6").value;
    if(tIM1.replace(/\s+/gi,"")==""&&tIM2.replace(/\s+/gi,"")==""&&tIM3.replace(/\s+/gi,"")==""&&tIM4.replace(/\s+/gi,"")==""&&tIM5.replace(/\s+/gi,"")==""&&tIM6.replace(/\s+/gi,"")==""){$get("MessagesBox").style.display='';$get("MessageImg").src = MessageImageF;
        $get("MessageText").innerHTML = MessageNoValue;showProgressBar(false);$get("btnSave").disabled = false;return;}else
    {
    
    if($get("tIM5").value.search(re)&&$get("tIM5").value!="")
    {   conceal();
        $get("btnSave").disabled = false;return;
    }else{WebServices.My.UpdateStuContact(tIM1,tIM2,tIM3,tIM4,tIM5,tIM6,onsucc);}
        
    }
}

function onsucc(result)
{
    if(result)
    {
        $get("MessagesBox").style.display='';
        $get("MessageImg").src = MessageImageS;
        $get("MessageText").innerHTML = MessageTextS;
   }
   else
   {
        $get("MessagesBox").style.display='';
        $get("MessageImg").src = MessageImageF;
        $get("MessageText").innerHTML = MessageTextF;
    }
    $get("btnSave").disabled = false;
    showProgressBar(false);
 }
 